Node JS!


Node JS


Node JS: Frameworks

Frameworks: Node is the bedrock upon which many frameworks exist These frameworks built by others are often massive open source projects that then get used by many others. Examples include:


Modules!


Modules -- Javascript in the browser vs Javascript in Node Server


Modules -- Javascript in the browser vs Javascript in Node Server

Module Standards:

Due to the fragmentation of who wrote what when, you'll often see two separate ways of importing modules:


Modules - Differences in Importing: ES Modules


Modules - Differences in Importing: CommonJS


Modules - Exporting

When exporting data, you can export a default function, or multiple functions to be treated as an object:

someFile.js

someImportingFile.js


Modules - Exporting

someOtherFile.js

Can be imported as:

OR


Modules - Exporting

Functions can also be exported as: defaultExportObject.js